]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Account for promisified call() method
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 19 Dec 2019 19:50:37 +0000 (20:50 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 3 Apr 2020 02:02:40 +0000 (02:02 +0000)
A promisified method expects the callback parameter to be either
a function (in which case the original method is called normally)
or omitted altogether (in which case a Promise is returned).

The call to open application details in Software does neither and
passes null instead, which will result in a warning (because no
function argument means a promise will be used, but not omitting
the parameter means we end up with too many arguments).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2551

js/ui/appDisplay.js
js/ui/panel.js

index 654afc56b6dd27170624ef6b4daabb60c48ab594..e13d5f7b9281cc180f4bff8a6aadfbf9f1cf4132 100644 (file)
@@ -2561,7 +2561,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
                         'org.gtk.Actions', 'Activate',
                         new GLib.Variant.new(
                             '(sava{sv})', ['details', [args], null]),
-                        null, 0, -1, null, null);
+                        null, 0, -1, null);
                     Main.overview.hide();
                 });
             }
index d1c314c05b19a9c4dcd6cdbbb32d52c2b7a8eb4f..c2e0f00d3a0d6667e387a059ff33e655cc706e91 100644 (file)
@@ -99,7 +99,7 @@ class AppMenu extends PopupMenu.PopupMenu {
                 '/org/gnome/Software',
                 'org.gtk.Actions', 'Activate',
                 new GLib.Variant('(sava{sv})', ['details', [args], null]),
-                null, 0, -1, null, null);
+                null, 0, -1, null);
         });
 
         this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());